<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>user index page</title>
</head>
<body>
<h1>user index page</h1>
<h3>${sessionScope.user.username}</h3>
<a href="/user/create.jsp">publish an article</a>
<hr>
<ol>
    <c:forEach var="article" items="${sessionScope.user.articles}">
        <li><a href="/article/queryArticleById/${article.id}">${article.title}</a></li>
    </c:forEach>
</ol>
<hr>
<a href="/user/signOut">sign out</a>
</body>
</html>